#include "list.h"

// ListIterator {

void * listIteratorData(const ListIterator * iterator) {
	return linkedListIteratorData(iterator);
}

ListIterator * listIteratorPrev(const ListIterator * iterator) {
	return linkedListIteratorPrev(iterator);
}

ListIterator * listIteratorNext(const ListIterator * iterator) {
	return linkedListIteratorNext(iterator);
}

// }

// List {

List * listNew(FunctionEqualTo equalTo, FunctionOnInserted onInserted, FunctionOnErased onErased) {
	return linkedListNew(equalTo, onInserted, onErased);
}

void listDelete(List * list) {
	linkedListDelete(list);
}

ListIterator * listBegin(const List * list) {
	return linkedListBegin(list);
}

ListIterator * listEnd(const List * list) {
	return linkedListEnd(list);
}

int listIsEmpty(const List * list) {
	return linkedListIsEmpty(list);
}

void listClear(List * list) {
	return linkedListClear(list);
}

ListIterator * listInsert(List * list, ListIterator * position, const void * data) {
	return linkedListInsert(list, position, data);
}

ListIterator * listErase(List * list, ListIterator * position) {
	return linkedListErase(list, position);
}

ListIterator * listFind(const List * list, const void * data) {
	return linkedListFind(list, data);
}

ListIterator * listFindIn(const List * list, const ListIterator * first, const ListIterator * last, const void * data) {
	return linkedListFindIn(list, first, last, data);
}

ListIterator * listFindIf(const List * list, const void * key, FunctionEqualTo equalTo) {
	return linkedListFindIf(list, key, equalTo);
}

ListIterator * listFindInIf(const List * list, const ListIterator * first, const ListIterator * last, const void * key, FunctionEqualTo equalTo) {
	return linkedListFindInIf(list, first, last, key, equalTo);
}

void listSplice(const List * list, ListIterator * position, const List * another) {
	listSplice(list, position, another);
}

void listSpliceAt(const List * list, ListIterator * position, const List * another, ListIterator * iterator) {
	linkedListSpliceAt(list, position, another, iterator);
}

void listSpliceIn(const List * list, ListIterator * position, const List * another, ListIterator * first, ListIterator * last) {
	linkedListSpliceIn(list, position, another, first, last);
}

void listTransfer(const List * list, ListIterator * position, const List * another, ListIterator * first, ListIterator * last) {
	linkedListTransfer(list, position, another, first, last);
}

void listMarge(const List * list, const List * another) {
	linkedListMarge(list, another);
}

// }

// ListForInt {

List * listForIntNew() {
	return linkedListForIntNew();
}

ListIterator * listForIntInsert(List * list, ListIterator * position, int data) {
	return linkedListForIntInsert(list, position, data);
}

ListIterator * listForIntFind(const List * list, int data) {
	return linkedListForIntFind(list, data);
}

ListIterator * listForIntFindIn(const List * list, const ListIterator * first, const ListIterator * last, int data) {
	return linkedListForIntFindIn(list, first, last, data);
}

// }

// ListForUInt {

List * listForUIntNew() {
	return linkedListForUIntNew();
}

ListIterator * listForUIntInsert(List * list, ListIterator * position, unsigned int data) {
	return linkedListForUIntInsert(list, position, data);
}

ListIterator * listForUIntFind(const List * list, unsigned int data) {
	return linkedListForUIntFind(list, data);
}

ListIterator * listForUIntFindIn(const List * list, const ListIterator * first, const ListIterator * last, unsigned int data) {
	return linkedListForUIntFindIn(list, first, last, data);
}

// }
